public class Cls {
    private int a;
    private int b;
//    public Class(){
//        this.a=a;
////        this.b=b;
//    }
    public void Cal(){
        int c=a/b;
        System.out.println("平均课时数是："+c);
    }
public void setA(int a) throws Exception {
    this.a = a;
    if(a<100){
        throw new Exception("输入课程数太少。");
    }
}

    public int getA() {
        return a;
    }

    public void setB(int b) {
        this.b = b;
    }

    public int getB() {
        return b;
    }
}
